﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
      <Schema Namespace="Хранилище Collaboration_SystemModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityType Name="Company">
          <Key>
            <PropertyRef Name="id" />
          </Key>
          <Property Name="id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="name" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="inn" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="Region" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="PhoneNumber" Type="nvarchar" MaxLength="20" Nullable="false" />
          <Property Name="DiscountCategory" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="Address" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="BusinessEmail" Type="nvarchar" MaxLength="100" Nullable="false" />
          <Property Name="LegalName" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="LegalAddress" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="MailingAddress" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="OGRN" Type="nvarchar" MaxLength="15" Nullable="false" />
          <Property Name="KPP" Type="nvarchar" MaxLength="9" Nullable="false" />
          <Property Name="GeneralDirectorName" Type="nvarchar" MaxLength="255" Nullable="false" />
        </EntityType>
        <EntityType Name="Lids">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Contact" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="NeedMaturity" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="SalesGroup" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="CompanyId" Type="int" />
          <Property Name="UserId" Type="int" />
        </EntityType>
        <EntityType Name="Notes">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Note" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="UserId" Type="int" />
        </EntityType>
        <EntityType Name="Product">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Name" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="Price" Type="decimal" Precision="18" Scale="2" Nullable="false" />
        </EntityType>
        <!--Ошибки, обнаруженные при создании:
предупреждение 6002: В таблице или представлении "Collaboration_System.dbo.Rights" не определен первичный ключ. Ключ был выведен, а определение таблицы или представления было создано в режиме только для чтения.-->
        <EntityType Name="Rights">
          <Key>
            <PropertyRef Name="user_id" />
            <PropertyRef Name="Rights1" />
            <PropertyRef Name="Rights2" />
            <PropertyRef Name="Rights3" />
            <PropertyRef Name="Rights4" />
            <PropertyRef Name="AdminRights" />
          </Key>
          <Property Name="user_id" Type="int" Nullable="false" />
          <Property Name="Rights1" Type="bit" Nullable="false" />
          <Property Name="Rights2" Type="bit" Nullable="false" />
          <Property Name="Rights3" Type="bit" Nullable="false" />
          <Property Name="Rights4" Type="bit" Nullable="false" />
          <Property Name="AdminRights" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="Task">
          <Key>
            <PropertyRef Name="id" />
          </Key>
          <Property Name="id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="name" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="description" Type="nvarchar" MaxLength="255" />
          <Property Name="company" Type="nvarchar" MaxLength="255" />
          <Property Name="status" Type="nvarchar" MaxLength="255" />
          <Property Name="date_issued" Type="date" />
          <Property Name="date_completed" Type="date" />
          <Property Name="priority" Type="nvarchar" MaxLength="255" />
          <Property Name="user_id" Type="int" />
        </EntityType>
        <EntityType Name="Transactions">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="LidId" Type="int" />
          <Property Name="Contact" Type="nvarchar" MaxLength="255" Nullable="false" />
          <Property Name="OurCompany" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="CounterpartyCompany" Type="nvarchar" MaxLength="50" />
          <Property Name="Responsible" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="Amount" Type="decimal" Precision="18" Scale="2" Nullable="false" />
          <Property Name="ProductId" Type="int" />
        </EntityType>
        <EntityType Name="Users">
          <Key>
            <PropertyRef Name="id" />
          </Key>
          <Property Name="id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="login" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="password" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="email" Type="varchar" MaxLength="100" Nullable="false" />
          <Property Name="Position" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="TaskCount" Type="int" Nullable="false" />
          <Property Name="CompletedTasks" Type="int" Nullable="false" />
          <Property Name="SuccessfulTasks" Type="int" Nullable="false" />
          <Property Name="FailedTasks" Type="int" Nullable="false" />
        </EntityType>
        <Association Name="FK__Lids__CompanyId__49C3F6B7">
          <End Role="Company" Type="Self.Company" Multiplicity="0..1" />
          <End Role="Lids" Type="Self.Lids" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Company">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Lids">
              <PropertyRef Name="CompanyId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Lids__UserId__4AB81AF0">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="Lids" Type="Self.Lids" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Lids">
              <PropertyRef Name="UserId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Notes__UserId__4BAC3F29">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="Notes" Type="Self.Notes" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Notes">
              <PropertyRef Name="UserId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Rights__user_id__4CA06362">
          <End Role="Users" Type="Self.Users" Multiplicity="1" />
          <End Role="Rights" Type="Self.Rights" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Rights">
              <PropertyRef Name="user_id" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Task__user_id__5AEE82B9">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="Task" Type="Self.Task" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Task">
              <PropertyRef Name="user_id" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Transacti__LidId__4D94879B">
          <End Role="Lids" Type="Self.Lids" Multiplicity="0..1" />
          <End Role="Transactions" Type="Self.Transactions" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Lids">
              <PropertyRef Name="Id" />
            </Principal>
            <Dependent Role="Transactions">
              <PropertyRef Name="LidId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Transacti__Produ__4E88ABD4">
          <End Role="Product" Type="Self.Product" Multiplicity="0..1" />
          <End Role="Transactions" Type="Self.Transactions" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Product">
              <PropertyRef Name="Id" />
            </Principal>
            <Dependent Role="Transactions">
              <PropertyRef Name="ProductId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Хранилище Collaboration_SystemModelContainer">
          <EntitySet Name="Company" EntityType="Self.Company" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Lids" EntityType="Self.Lids" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Notes" EntityType="Self.Notes" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Task" EntityType="Self.Task" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Transactions" EntityType="Self.Transactions" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Rights" EntityType="Self.Rights" store:Type="Tables" store:Schema="dbo">
            <DefiningQuery>SELECT 
    [Rights].[user_id] AS [user_id], 
    [Rights].[Rights1] AS [Rights1], 
    [Rights].[Rights2] AS [Rights2], 
    [Rights].[Rights3] AS [Rights3], 
    [Rights].[Rights4] AS [Rights4], 
    [Rights].[AdminRights] AS [AdminRights]
    FROM [dbo].[Rights] AS [Rights]</DefiningQuery>
          </EntitySet>
          <AssociationSet Name="FK__Lids__CompanyId__49C3F6B7" Association="Self.FK__Lids__CompanyId__49C3F6B7">
            <End Role="Company" EntitySet="Company" />
            <End Role="Lids" EntitySet="Lids" />
          </AssociationSet>
          <AssociationSet Name="FK__Lids__UserId__4AB81AF0" Association="Self.FK__Lids__UserId__4AB81AF0">
            <End Role="Users" EntitySet="Users" />
            <End Role="Lids" EntitySet="Lids" />
          </AssociationSet>
          <AssociationSet Name="FK__Notes__UserId__4BAC3F29" Association="Self.FK__Notes__UserId__4BAC3F29">
            <End Role="Users" EntitySet="Users" />
            <End Role="Notes" EntitySet="Notes" />
          </AssociationSet>
          <AssociationSet Name="FK__Rights__user_id__4CA06362" Association="Self.FK__Rights__user_id__4CA06362">
            <End Role="Users" EntitySet="Users" />
            <End Role="Rights" EntitySet="Rights" />
          </AssociationSet>
          <AssociationSet Name="FK__Task__user_id__5AEE82B9" Association="Self.FK__Task__user_id__5AEE82B9">
            <End Role="Users" EntitySet="Users" />
            <End Role="Task" EntitySet="Task" />
          </AssociationSet>
          <AssociationSet Name="FK__Transacti__LidId__4D94879B" Association="Self.FK__Transacti__LidId__4D94879B">
            <End Role="Lids" EntitySet="Lids" />
            <End Role="Transactions" EntitySet="Transactions" />
          </AssociationSet>
          <AssociationSet Name="FK__Transacti__Produ__4E88ABD4" Association="Self.FK__Transacti__Produ__4E88ABD4">
            <End Role="Product" EntitySet="Product" />
            <End Role="Transactions" EntitySet="Transactions" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="Collaboration_SystemModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityType Name="Company">
          <Key>
            <PropertyRef Name="id" />
          </Key>
          <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="name" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Name="inn" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Name="Region" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="PhoneNumber" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="DiscountCategory" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="Address" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="BusinessEmail" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="LegalName" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="LegalAddress" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="MailingAddress" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="OGRN" Type="String" MaxLength="15" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="GeneralDirectorName" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <NavigationProperty Name="Lids" Relationship="Self.FK__Lids__CompanyId__49C3F6B7" FromRole="Company" ToRole="Lids" />
        </EntityType>
        <EntityType Name="Lids">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Contact" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="NeedMaturity" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="SalesGroup" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="CompanyId" Type="Int32" />
          <Property Name="UserId" Type="Int32" />
          <NavigationProperty Name="Company" Relationship="Self.FK__Lids__CompanyId__49C3F6B7" FromRole="Lids" ToRole="Company" />
          <NavigationProperty Name="Users" Relationship="Self.FK__Lids__UserId__4AB81AF0" FromRole="Lids" ToRole="Users" />
          <NavigationProperty Name="Transactions" Relationship="Self.FK__Transacti__LidId__4D94879B" FromRole="Lids" ToRole="Transactions" />
        </EntityType>
        <EntityType Name="Notes">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Note" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="UserId" Type="Int32" />
          <NavigationProperty Name="Users" Relationship="Self.FK__Notes__UserId__4BAC3F29" FromRole="Notes" ToRole="Users" />
        </EntityType>
        <EntityType Name="Product">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Name" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="Price" Type="Decimal" Precision="18" Scale="2" Nullable="false" />
          <NavigationProperty Name="Transactions" Relationship="Self.FK__Transacti__Produ__4E88ABD4" FromRole="Product" ToRole="Transactions" />
        </EntityType>
        <EntityType Name="Task">
          <Key>
            <PropertyRef Name="id" />
          </Key>
          <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="name" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="description" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
          <Property Name="company" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
          <Property Name="status" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
          <Property Name="date_issued" Type="DateTime" Precision="0" />
          <Property Name="date_completed" Type="DateTime" Precision="0" />
          <Property Name="priority" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
          <Property Name="user_id" Type="Int32" />
          <NavigationProperty Name="Users" Relationship="Self.FK__Task__user_id__5AEE82B9" FromRole="Task" ToRole="Users" />
        </EntityType>
        <EntityType Name="Transactions">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="LidId" Type="Int32" />
          <Property Name="Contact" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="OurCompany" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="CounterpartyCompany" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
          <Property Name="Responsible" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="Amount" Type="Decimal" Precision="18" Scale="2" Nullable="false" />
          <Property Name="ProductId" Type="Int32" />
          <NavigationProperty Name="Lids" Relationship="Self.FK__Transacti__LidId__4D94879B" FromRole="Transactions" ToRole="Lids" />
          <NavigationProperty Name="Product" Relationship="Self.FK__Transacti__Produ__4E88ABD4" FromRole="Transactions" ToRole="Product" />
        </EntityType>
        <EntityType Name="Users">
          <Key>
            <PropertyRef Name="id" />
          </Key>
          <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="login" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Name="password" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Name="email" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Name="Position" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="TaskCount" Type="Int32" Nullable="false" />
          <Property Name="CompletedTasks" Type="Int32" Nullable="false" />
          <Property Name="SuccessfulTasks" Type="Int32" Nullable="false" />
          <Property Name="FailedTasks" Type="Int32" Nullable="false" />
          <NavigationProperty Name="Lids" Relationship="Self.FK__Lids__UserId__4AB81AF0" FromRole="Users" ToRole="Lids" />
          <NavigationProperty Name="Notes" Relationship="Self.FK__Notes__UserId__4BAC3F29" FromRole="Users" ToRole="Notes" />
          <NavigationProperty Name="Task" Relationship="Self.FK__Task__user_id__5AEE82B9" FromRole="Users" ToRole="Task" />
          <NavigationProperty Name="Rights" Relationship="Self.FK__Rights__user_id__4CA06362" FromRole="Users" ToRole="Rights" />
        </EntityType>
        <EntityType Name="Rights">
          <Key>
            <PropertyRef Name="user_id" />
            <PropertyRef Name="Rights1" />
            <PropertyRef Name="Rights2" />
            <PropertyRef Name="Rights3" />
            <PropertyRef Name="Rights4" />
            <PropertyRef Name="AdminRights" />
          </Key>
          <Property Name="user_id" Type="Int32" Nullable="false" />
          <Property Name="Rights1" Type="Boolean" Nullable="false" />
          <Property Name="Rights2" Type="Boolean" Nullable="false" />
          <Property Name="Rights3" Type="Boolean" Nullable="false" />
          <Property Name="Rights4" Type="Boolean" Nullable="false" />
          <Property Name="AdminRights" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="Users" Relationship="Self.FK__Rights__user_id__4CA06362" FromRole="Rights" ToRole="Users" />
        </EntityType>
        <Association Name="FK__Lids__CompanyId__49C3F6B7">
          <End Role="Company" Type="Self.Company" Multiplicity="0..1" />
          <End Role="Lids" Type="Self.Lids" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Company">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Lids">
              <PropertyRef Name="CompanyId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Lids__UserId__4AB81AF0">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="Lids" Type="Self.Lids" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Lids">
              <PropertyRef Name="UserId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Transacti__LidId__4D94879B">
          <End Role="Lids" Type="Self.Lids" Multiplicity="0..1" />
          <End Role="Transactions" Type="Self.Transactions" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Lids">
              <PropertyRef Name="Id" />
            </Principal>
            <Dependent Role="Transactions">
              <PropertyRef Name="LidId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Notes__UserId__4BAC3F29">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="Notes" Type="Self.Notes" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Notes">
              <PropertyRef Name="UserId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Transacti__Produ__4E88ABD4">
          <End Role="Product" Type="Self.Product" Multiplicity="0..1" />
          <End Role="Transactions" Type="Self.Transactions" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Product">
              <PropertyRef Name="Id" />
            </Principal>
            <Dependent Role="Transactions">
              <PropertyRef Name="ProductId" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Task__user_id__5AEE82B9">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="Task" Type="Self.Task" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Task">
              <PropertyRef Name="user_id" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK__Rights__user_id__4CA06362">
          <End Role="Users" Type="Self.Users" Multiplicity="1" />
          <End Role="Rights" Type="Self.Rights" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="Rights">
              <PropertyRef Name="user_id" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Collaboration_SystemEntities" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="Company" EntityType="Self.Company" />
          <EntitySet Name="Lids" EntityType="Self.Lids" />
          <EntitySet Name="Notes" EntityType="Self.Notes" />
          <EntitySet Name="Product" EntityType="Self.Product" />
          <EntitySet Name="Task" EntityType="Self.Task" />
          <EntitySet Name="Transactions" EntityType="Self.Transactions" />
          <EntitySet Name="Users" EntityType="Self.Users" />
          <EntitySet Name="Rights" EntityType="Self.Rights" />
          <AssociationSet Name="FK__Lids__CompanyId__49C3F6B7" Association="Self.FK__Lids__CompanyId__49C3F6B7">
            <End Role="Company" EntitySet="Company" />
            <End Role="Lids" EntitySet="Lids" />
          </AssociationSet>
          <AssociationSet Name="FK__Lids__UserId__4AB81AF0" Association="Self.FK__Lids__UserId__4AB81AF0">
            <End Role="Users" EntitySet="Users" />
            <End Role="Lids" EntitySet="Lids" />
          </AssociationSet>
          <AssociationSet Name="FK__Transacti__LidId__4D94879B" Association="Self.FK__Transacti__LidId__4D94879B">
            <End Role="Lids" EntitySet="Lids" />
            <End Role="Transactions" EntitySet="Transactions" />
          </AssociationSet>
          <AssociationSet Name="FK__Notes__UserId__4BAC3F29" Association="Self.FK__Notes__UserId__4BAC3F29">
            <End Role="Users" EntitySet="Users" />
            <End Role="Notes" EntitySet="Notes" />
          </AssociationSet>
          <AssociationSet Name="FK__Transacti__Produ__4E88ABD4" Association="Self.FK__Transacti__Produ__4E88ABD4">
            <End Role="Product" EntitySet="Product" />
            <End Role="Transactions" EntitySet="Transactions" />
          </AssociationSet>
          <AssociationSet Name="FK__Task__user_id__5AEE82B9" Association="Self.FK__Task__user_id__5AEE82B9">
            <End Role="Users" EntitySet="Users" />
            <End Role="Task" EntitySet="Task" />
          </AssociationSet>
          <AssociationSet Name="FK__Rights__user_id__4CA06362" Association="Self.FK__Rights__user_id__4CA06362">
            <End Role="Users" EntitySet="Users" />
            <End Role="Rights" EntitySet="Rights" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
        <EntityContainerMapping StorageEntityContainer="Хранилище Collaboration_SystemModelContainer" CdmEntityContainer="Collaboration_SystemEntities">
          <EntitySetMapping Name="Company">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Company">
              <MappingFragment StoreEntitySet="Company">
                <ScalarProperty Name="id" ColumnName="id" />
                <ScalarProperty Name="name" ColumnName="name" />
                <ScalarProperty Name="inn" ColumnName="inn" />
                <ScalarProperty Name="Region" ColumnName="Region" />
                <ScalarProperty Name="PhoneNumber" ColumnName="PhoneNumber" />
                <ScalarProperty Name="DiscountCategory" ColumnName="DiscountCategory" />
                <ScalarProperty Name="Address" ColumnName="Address" />
                <ScalarProperty Name="BusinessEmail" ColumnName="BusinessEmail" />
                <ScalarProperty Name="LegalName" ColumnName="LegalName" />
                <ScalarProperty Name="LegalAddress" ColumnName="LegalAddress" />
                <ScalarProperty Name="MailingAddress" ColumnName="MailingAddress" />
                <ScalarProperty Name="OGRN" ColumnName="OGRN" />
                <ScalarProperty Name="KPP" ColumnName="KPP" />
                <ScalarProperty Name="GeneralDirectorName" ColumnName="GeneralDirectorName" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Lids">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Lids">
              <MappingFragment StoreEntitySet="Lids">
                <ScalarProperty Name="Id" ColumnName="Id" />
                <ScalarProperty Name="Contact" ColumnName="Contact" />
                <ScalarProperty Name="NeedMaturity" ColumnName="NeedMaturity" />
                <ScalarProperty Name="SalesGroup" ColumnName="SalesGroup" />
                <ScalarProperty Name="CompanyId" ColumnName="CompanyId" />
                <ScalarProperty Name="UserId" ColumnName="UserId" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Notes">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Notes">
              <MappingFragment StoreEntitySet="Notes">
                <ScalarProperty Name="Id" ColumnName="Id" />
                <ScalarProperty Name="Note" ColumnName="Note" />
                <ScalarProperty Name="UserId" ColumnName="UserId" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Product">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Product">
              <MappingFragment StoreEntitySet="Product">
                <ScalarProperty Name="Id" ColumnName="Id" />
                <ScalarProperty Name="Name" ColumnName="Name" />
                <ScalarProperty Name="Price" ColumnName="Price" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Task">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Task">
              <MappingFragment StoreEntitySet="Task">
                <ScalarProperty Name="id" ColumnName="id" />
                <ScalarProperty Name="name" ColumnName="name" />
                <ScalarProperty Name="description" ColumnName="description" />
                <ScalarProperty Name="company" ColumnName="company" />
                <ScalarProperty Name="status" ColumnName="status" />
                <ScalarProperty Name="date_issued" ColumnName="date_issued" />
                <ScalarProperty Name="date_completed" ColumnName="date_completed" />
                <ScalarProperty Name="priority" ColumnName="priority" />
                <ScalarProperty Name="user_id" ColumnName="user_id" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Transactions">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Transactions">
              <MappingFragment StoreEntitySet="Transactions">
                <ScalarProperty Name="Id" ColumnName="Id" />
                <ScalarProperty Name="LidId" ColumnName="LidId" />
                <ScalarProperty Name="Contact" ColumnName="Contact" />
                <ScalarProperty Name="OurCompany" ColumnName="OurCompany" />
                <ScalarProperty Name="CounterpartyCompany" ColumnName="CounterpartyCompany" />
                <ScalarProperty Name="Responsible" ColumnName="Responsible" />
                <ScalarProperty Name="Amount" ColumnName="Amount" />
                <ScalarProperty Name="ProductId" ColumnName="ProductId" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Users">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Users">
              <MappingFragment StoreEntitySet="Users">
                <ScalarProperty Name="id" ColumnName="id" />
                <ScalarProperty Name="login" ColumnName="login" />
                <ScalarProperty Name="password" ColumnName="password" />
                <ScalarProperty Name="email" ColumnName="email" />
                <ScalarProperty Name="Position" ColumnName="Position" />
                <ScalarProperty Name="TaskCount" ColumnName="TaskCount" />
                <ScalarProperty Name="CompletedTasks" ColumnName="CompletedTasks" />
                <ScalarProperty Name="SuccessfulTasks" ColumnName="SuccessfulTasks" />
                <ScalarProperty Name="FailedTasks" ColumnName="FailedTasks" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Rights">
            <EntityTypeMapping TypeName="Collaboration_SystemModel.Rights">
              <MappingFragment StoreEntitySet="Rights">
                <ScalarProperty Name="user_id" ColumnName="user_id" />
                <ScalarProperty Name="Rights1" ColumnName="Rights1" />
                <ScalarProperty Name="Rights2" ColumnName="Rights2" />
                <ScalarProperty Name="Rights3" ColumnName="Rights3" />
                <ScalarProperty Name="Rights4" ColumnName="Rights4" />
                <ScalarProperty Name="AdminRights" ColumnName="AdminRights" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
        </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="false" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
        <DesignerProperty Name="UseLegacyProvider" Value="false" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams></Diagrams>
  </Designer>
</edmx:Edmx>